<template>
  <input type="text" placeholder="请输入搜索关键字" v-model="keyword">
  <br><br>
  <input type="text" placeholder="请输入用户名" v-model="user.username"><br>
  <input type="text" placeholder="请输入密码" v-model="user.password">
</template>

<script setup>
  import { ref, watch, reactive } from 'vue'
  const keyword = ref('')
  watch(keyword, (newVal, oldVal) =>{
    console.log(newVal, oldVal)
  })

  const user = reactive({
    username: '',
    password: ''
  })
  watch(user, (newVal, oldVal) => {
    console.log(newVal, oldVal)
  })
</script>

<style scoped>

</style>